package qmlt.learning.svm;

import libsvm.svm_parameter;

public class SVMController
{

	public svm_parameter param = new svm_parameter();
	
	public SVMController()
	{
		// default values
		param.svm_type = svm_parameter.C_SVC;
		param.kernel_type = svm_parameter.RBF;
		param.degree = 3;
		param.gamma = 0;	// 1/num_features
		param.coef0 = 0;
		param.nu = 0.5;
		param.cache_size = 100;
		param.C = 1;
		param.eps = 1e-3;
		param.p = 0.1;
		param.shrinking = 1;
		param.probability = 0;
		param.nr_weight = 0;
		param.weight_label = new int[0];
		param.weight = new double[0];
	}
	
	public SVMController(double C, double gamma)
	{
		this();
		param.C = C;
		param.gamma = gamma;
	}
	
	public String toString()
	{
		StringBuilder sb = new StringBuilder();
		sb.append("C=" + param.C);
		sb.append("/gamma=" + param.gamma);
		return sb.toString();
	}
}
